<div class="card">
    <div class="card-header">
        <h3 class="card-title">修改头像</h3>
    </div>
    <div class="card-body p-0">

        <form action="form.cgi?action=add_head" method="post">

            <div class="card-body">
                <input name="id" class="form-control" value="$id" style="display: none;" placeholder="id">




                <div class="form-group">
                    <img id="userPng" width="128xp" height="128xp" src="/static/img/user2-160x160.jpg"></img>
                </div>


                <div class="form-group">
                    <label>头像选择</label>
                    <select name="userPng" class="form-control"
                        onchange="setImg(this.options[this.options.selectedIndex].value)">
                        $png
                    </select>
                </div>


                <script>
                    function setImg(v) {
                        \$("#userPng").attr("src", v)

                    }
                </script>


            </div>
            <div class="card-footer">
                <button type="submit" class="btn btn-primary">提交</button>
            </div>
        </form>



    </div>

</div>